<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户偏好设置</title>
    <style id="themeStyle"></style>
    <script>
        function setTheme(color) {
            localStorage.setItem('themeColor', color);
            document.getElementById('themeStyle').innerHTML = `body { background-color: ${color}; }`;
        }

        window.onload = function() {
            const savedTheme = localStorage.getItem('themeColor');
            if (savedTheme) {
                setTheme(savedTheme);
            }
        };
    </script>
</head>
<body>
    <button onclick="setTheme('lightblue')">浅蓝色主题</button>
    <button onclick="setTheme('lightgreen')">浅绿色主题</button>
    <button onclick="setTheme('white')">白色主题</button>
</body>
</html>